/** * @description: 学生请假统计 */
<template>
  <div class="pub-container">
    <van-tabs v-model="active" swipe-threshold="4" title-active-color="#2E6CF6" title-inactive-color="#5F5F6B" line-width="24">
      <!-- 行为失范预警 -->
      <van-tab title="行为失范预警">
        <BehaviorAnomie v-if="active === 0" />
      </van-tab>

      <!-- 心理预警 -->
      <van-tab title="心理预警">
        <PsyWarning v-if="active === 1" />
      </van-tab>

      <!-- 学业预警 -->
      <van-tab title="学业预警">
        <StudyWarning v-if="active === 2" />
      </van-tab>
    </van-tabs>
  </div>
</template>

<script>
import BehaviorAnomie from './behaviorAnomie'
import PsyWarning from './psyWarning'
import StudyWarning from './studyWarning'
export default {
  name: 'WarningStu',
  components: { BehaviorAnomie, PsyWarning, StudyWarning },
  data() {
    return {
      active: 0,
    }
  },
  created() {
    this.active = this.$route.query.active || 0
  },
}
</script>

<style lang="scss" scoped>
::v-deep {
  .van-tabs__line {
    background: #2e6cf6;
  }
}
</style>
